{% extends "/news/base.html" %}
{% block titleBlock %}用户中心{% endblock %}
{% block scriptBlock %}<script type="text/javascript" src="../../static/news/js/jquery.form.min.js"></script>{% endblock %}
{% block headerBlock %} {% endblock %}


{% block userbase %}
            {% if data.user_info %}
                <div class="user_login fr">
                <img src="{% if data.user_info.avatar_url %}{{ data.user_info.avatar_url }}{% else %}../../static/news/images/user_pic.png{% endif %}" class="lgin_pic">
                <a href="/user/info" id="nick_name">用户{{ data.user_info.nick_name }}</a>
                <a href="#" onclick="logout()">退出</a>
            </div>
            {% else %}
                <div class="user_btns fr">
                    <a href="javascript:;" class="login_btn">登录</a> / <a href="javascript:;" class="register_btn">注册</a>
                </div>
            {% endif %}
            {% endblock %}



{% block contentBlock %}
	<div class="conter_con">
		<div class="user_menu_con fl">
			<div class="user_center_pic">
				<img src="{% if data.user_info.avatar_url %}{{ data.user_info.avatar_url }}{% else %}../../static/news/images/user_pic.png{% endif %}" alt="用户图片">
			</div>
			<div class="user_center_name"> {{ data.user_info.nick_name }}</div>

			<ul class="option_list">
				<li class="active"><a href="{{ url_for('profile.base_info') }}" target="main_frame">基本资料</a></li>
				<li><a href="{{ url_for('profile.pic_info') }}" target="main_frame">头像设置</a></li>
				<li><a href="../../static/news/html/user_follow.html" target="main_frame">我的关注</a></li>
				<li><a href="{{ url_for('profile.pass_info') }}" target="main_frame">密码修改</a></li>
				<li><a href="{{ url_for('profile.collection') }}" target="main_frame">我的收藏</a></li>
				<li><a href="{{ url_for("profile.news_release") }}" target="main_frame">新闻发布</a></li>
				<li><a href="{{ url_for("profile.news_list") }}" target="main_frame">新闻列表</a></li>
			</ul>
		</div>

		<div class="user_con fr">
			<iframe src="{{ url_for("profile.base_info") }}" frameborder="0" name="main_frame" class="main_frame" id="main_frame"></iframe>
		</div>
	</div>
{% endblock %}

